<?php

defined( '_VALID_SHOPAGTE' ) or die( 'Direct Access to this location is not allowed.' );

/**
 *  
 *  File is include by admin.php
 *  
 *  @version 1.0.0
 *  @author Martin Weber
 *  @revision $Rev: 655 $
 */
set_include_path(get_include_path().PATH_SEPARATOR.realpath(dirname(__FILE__)."/../../../"));

include_once 'includes/application_top.php';

function getOrderStatus() {
	$qry = "
		SELECT s.orders_status_id, s.orders_status_name
		FROM ".TABLE_ORDERS_STATUS." s
		JOIN ".TABLE_LANGUAGES." lang ON s.language_id = lang.languages_id
		WHERE UPPER(lang.code) = UPPER('de')
	";

	$statuses = array();
	
	if(function_exists("xtc_db_query")) {
		$qry = xtc_db_query($qry);
		for($i=0; $i < xtc_db_num_rows($qry); $i++) {
			$row = xtc_db_fetch_array($qry);
			$statuses[$row["orders_status_id"]] = $row["orders_status_name"];
		}
	}

	return $statuses;
}